import React from 'react';
import SegmentElement from './SegmentElement';

interface TrackLayerProps {
    track: any;
    draftData: any;
}

const TrackLayer: React.FC<TrackLayerProps> = ({ track, draftData }) => {
    return (
        <div className="track-layer">
            {track.segments.map((segment: any) => (
                <SegmentElement
                    key={segment.id}
                    segment={segment}
                    trackType={track.type}
                    draftData={draftData}
                />
            ))}
        </div>
    );
};

export default TrackLayer;
